{% block sw_sales_channel_detail_base %}
<div class="sw-sales-channel-detail-base">

    {% block sw_sales_channel_detail_base_general %}
    <mt-card
        v-if="salesChannel"
        position-identifier="sw-sales-channel-detail-base-general"
        :is-loading="isLoading"
        :title="$tc('sw-sales-channel.detail.titleGeneralSettings')"
    >
        {% block sw_sales_channel_detail_base_general_input_product_comparison_template %}
        <mt-select
            v-if="isProductComparison"
            v-model="templateName"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :label="$tc('sw-sales-channel.detail.productComparison.templates.label')"
            :placeholder="$tc('sw-sales-channel.detail.productComparison.templates.placeholderSelectTemplate')"
            :options="templateSelectOptions"
            @update:model-value="(templateName) => $emit('template-selected', templateName)"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_product_comparison_template_modal %}
        <sw-modal
            v-if="showTemplateModal"
            :title="$tc('sw-sales-channel.detail.productComparison.templates.modal-title')"
            @modal-close="$emit('template-modal-close')"
            @template-modal-confirm="$emit('template-modal-confirm')"
        >
            {% block sw_sales_channel_detail_product_comparison_template_modal_notification %}
            <p>{{ $tc('sw-sales-channel.detail.productComparison.templates.modal-message') }}</p>

            <template #modal-footer>
                <mt-button
                    size="small"
                    variant="secondary"
                    @click="$emit('template-modal-close')"
                >
                    {{ $tc('global.default.cancel') }}
                </mt-button>
                <mt-button
                    size="small"
                    variant="primary"
                    @click="$emit('template-modal-confirm')"
                >
                    {{ $tc('sw-sales-channel.detail.productComparison.templates.modal-confirm') }}
                </mt-button>
            </template>
            {% endblock %}
        </sw-modal>
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_name %}

        <mt-text-field
            v-model="salesChannel.name"
            validation="required"
            required
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :placeholder="placeholder(salesChannel, 'name', $tc('sw-sales-channel.detail.placeholderName'))"
            :label="$tc('sw-sales-channel.detail.labelInputName')"
            :error="salesChannelNameError"
            class="sw-field--salesChannel-name"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_favorite %}

        <mt-switch
            :disabled="!acl.can('user_config:create') || !acl.can('user_config:update') || salesChannel._isNew"
            :label="$tc('sw-sales-channel.detail.favouriteLabel')"
            :model-value="isFavorite()"
            @update:model-value="(isFavorite) => { salesChannelFavoritesService.update(isFavorite, salesChannel.id) }"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_navigation_category_container %}
        <sw-container
            v-if="!isProductComparison"
            columns="1fr 200px"
            gap="0 30px"
        >

            {% block sw_sales_channel_detail_base_general_input_navigation_category %}
            <sw-category-tree-field
                v-if="!isProductComparison"
                id="navigationCategoryId"
                required
                :categories-collection="mainCategories"
                :placeholder="navigationCategoryPlaceholder"
                :single-select="true"
                :label="$tc('sw-sales-channel.detail.navigationCategoryId')"
                :disabled="!acl.can('sales_channel.editor') || undefined"
                :help-text="$tc('sw-sales-channel.detail.navigationCategoryHelpText')"
                :error="salesChannelNavigationCategoryIdError"
                class="sw-sales-channel-detail__select-navigation-category-id"
                @selection-add="onMainSelectionAdd"
                @selection-remove="onMainSelectionRemove"
            />
            {% endblock %}

            {% block sw_sales_channel_detail_base_general_input_navigation_category_depth %}
            <mt-number-field
                v-model="salesChannel.navigationCategoryDepth"
                number-type="int"
                :min="1"
                :disabled="!acl.can('sales_channel.editor') || undefined"
                :label="$tc('sw-sales-channel.detail.navigationCategoryDepth')"
            />
            {% endblock %}
        </sw-container>
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_footer_category %}
        <sw-category-tree-field
            v-if="!isProductComparison"
            :categories-collection="footerCategories"
            :placeholder="footerCategoryPlaceholder"
            :single-select="true"
            :label="$tc('sw-sales-channel.detail.footerCategory')"
            :disabled="!acl.can('sales_channel.editor')"
            class="sw-sales-channel-detail__select-footer-category-id"
            @selection-add="onFooterSelectionAdd"
            @selection-remove="onFooterSelectionRemove"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_service_category %}
        <sw-category-tree-field
            v-if="!isProductComparison"
            :categories-collection="serviceCategories"
            :placeholder="serviceCategoryPlaceholder"
            :single-select="true"
            :label="$tc('sw-sales-channel.detail.serviceCategory')"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            class="sw-sales-channel-detail__select-service-category-id"
            @selection-add="onServiceSelectionAdd"
            @selection-remove="onServiceSelectionRemove"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_customer_group %}
        <sw-entity-single-select
            v-if="!isProductComparison"
            v-model:value="salesChannel.customerGroupId"
            class="sw-sales-channel-detail__select-customer-group"
            required
            show-clearable-button
            :label="$tc('sw-sales-channel.detail.customerGroup')"
            entity="customer_group"
            :error="salesChannelCustomerGroupIdError"
            :disabled="!acl.can('sales_channel.editor')"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_disabled_countries_warning %}
        <mt-banner
            v-if="disabledCountries.length > 0"
            :variant="disabledCountryVariant"
            :title="$tc('global.default.' + disabledCountryVariant)"
        >
            <span v-html="buildDisabledPaymentAlert('sw-sales-channel.detail.warningDisabledCountries', disabledCountries)"></span>
        </mt-banner>
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_countries %}
        <sw-sales-channel-defaults-select
            v-if="!isProductComparison"
            :sales-channel="salesChannel"
            property-name="countries"
            :property-label="$tc('sw-sales-channel.detail.labelInputCountries')"
            :help-text="$tc('sw-sales-channel.detail.countryMultiSelectHelpText')"
            default-property-name="countryId"
            :criteria="countryCriteria"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :default-property-label="$tc('sw-sales-channel.detail.labelInputDefaultCountry')"
            :disabled-tooltip-message="$tc('sw-sales-channel.detail.tooltipDisabledCountry')"
            should-show-active-state
        />
        {% endblock %}

        <mt-banner
            v-if="unservedLanguages.length > 0"
            :variant="unservedLanguageVariant"
            :title="$tc('global.default.' + unservedLanguageVariant)"
        >
            <span v-html="buildUnservedLanguagesAlert('sw-sales-channel.detail.warningUnservedLanguage', unservedLanguages)"></span>
        </mt-banner>

        {% block sw_sales_channel_detail_base_general_input_languages %}
        <sw-sales-channel-defaults-select
            v-if="!isProductComparison"
            :sales-channel="salesChannel"
            :criteria="languageCriteria"
            property-name="languages"
            :property-label="$tc('sw-sales-channel.detail.labelInputLanguages')"
            default-property-name="languageId"
            :default-property-label="$tc('sw-sales-channel.detail.labelInputDefaultLanguage')"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            property-name-in-domain="languageId"
        />
        {% endblock %}

        <sw-sales-channel-measurement
            v-if="!isProductComparison"
            :sales-channel="salesChannel"
            :label-unit-system="$tc('sw-sales-channel.detail.measurementSystem.labelDefaultUnitSystem')"
            :label-length-unit="$tc('sw-sales-channel.detail.measurementSystem.labelDefaultLengthUnit')"
            :label-weight-unit="$tc('sw-sales-channel.detail.measurementSystem.labelDefaultWeightUnit')"
        />
    </mt-card>
    {% endblock %}

    {% block sw_sales_channel_shipping_payment %}
    <mt-card
        v-if="salesChannel"
        position-identifier="sw-sales-channel-detail-base-shipping-payment"
        :is-loading="isLoading"
        :title="$tc('sw-sales-channel.detail.titleShippingPayment')"
    >
        {% block sw_sales_channel_detail_base_disabled_payments_methods_warning %}
        <mt-banner
            v-if="disabledPaymentMethods.length > 0"
            :variant="disabledPaymentMethodVariant"
            :title="$tc('global.default.' + disabledPaymentMethodVariant)"
        >
            <span v-html="buildDisabledPaymentAlert('sw-sales-channel.detail.warningDisabledPaymentMethod', disabledPaymentMethods, 'distinguishableName')"></span>
        </mt-banner>
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_payments_methods %}
        <sw-sales-channel-defaults-select
            v-if="!isProductComparison"
            :sales-channel="salesChannel"
            property-name="paymentMethods"
            :criteria="paymentMethodCriteria"
            :property-label="$tc('sw-sales-channel.detail.labelInputPaymentMethods')"
            default-property-name="paymentMethodId"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :default-property-label="$tc('sw-sales-channel.detail.labelInputDefaultPaymentMethod')"
            :disabled-tooltip-message="$tc('sw-sales-channel.detail.tooltipDisabledPaymentMethod')"
            should-show-active-state
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_disabled_shipping_methods_warning %}
        <mt-banner
            v-if="disabledShippingMethods.length > 0"
            :variant="disabledShippingMethodVariant"
            :title="$tc('global.default.' + disabledShippingMethodVariant)"
        >
            <span v-html="buildDisabledShippingAlert('sw-sales-channel.detail.warningDisabledShippingMethod', disabledShippingMethods)"></span>
        </mt-banner>
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_shipping_methods %}
        <sw-sales-channel-defaults-select
            v-if="!isProductComparison"
            :sales-channel="salesChannel"
            property-name="shippingMethods"
            :property-label="$tc('sw-sales-channel.detail.labelInputShippingMethods')"
            default-property-name="shippingMethodId"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :default-property-label="$tc('sw-sales-channel.detail.labelInputDefaultShippingMethod')"
            :disabled-tooltip-message="$tc('sw-sales-channel.detail.tooltipDisabledShippingMethod')"
            should-show-active-state
            :criteria="shippingMethodCriteria"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_currencies %}
        <sw-sales-channel-defaults-select
            v-if="!isProductComparison"
            :sales-channel="salesChannel"
            property-name="currencies"
            :property-label="$tc('sw-sales-channel.detail.labelInputCurrencies')"
            default-property-name="currencyId"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :default-property-label="$tc('sw-sales-channel.detail.labelInputDefaultCurrency')"
            property-name-in-domain="currencyId"
            :criteria="currencyCriteria"
        />
        {% endblock %}

        <sw-radio-field
            v-model:value="salesChannel.taxCalculationType"
            :label="$tc('sw-sales-channel.detail.labelTaxCalculation')"
            :help-text="helpTextTaxCalculation"
            block
            class="sw-sales-channel-detail__tax-calculation"
            identification="taxCalculation"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :description="$tc('sw-sales-channel.detail.descriptionTaxCalculation')"
            :options="taxCalculationTypeOptions"
        />
    </mt-card>
    {% endblock %}

    {% block sw_sales_channel_detail_base_options_hreflang %}
    <sw-sales-channel-detail-hreflang
        v-if="salesChannel && isStorefront"
        :sales-channel="salesChannel"
        :disabled="!acl.can('sales_channel.editor') || undefined"
        :is-loading="isLoading"
    />
    {% endblock %}

    {% block sw_sales_channel_detail_base_options_domains %}
    <sw-sales-channel-detail-domains
        v-if="salesChannel && isDomainAware"
        :sales-channel="salesChannel"
        :disable-edit="!acl.can('sales_channel.editor') || undefined"
        :is-loading="isLoading"
    />
    {% endblock %}

    {% block sw_sales_channel_detail_base_general_input_product_comparison_storefront %}
    <mt-card
        v-if="salesChannel && isProductComparison"
        position-identifier="sw-sales-channel-detail-base-general-input-product-comparison-storefront"
        :is-loading="isLoading"
        :title="$tc('sw-sales-channel.detail.productComparison.storefront')"
    >
        {% block sw_sales_channel_detail_base_general_input_product_comparison_storefront_select %}
        <sw-entity-single-select
            v-model:value="productExport.storefrontSalesChannelId"
            class="sw-sales-channel-detail__product-comparison-storefront"
            :label="$tc('sw-sales-channel.detail.productComparison.storefront')"
            :criteria="storefrontSalesChannelCriteria"
            label-property="name"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            value-property="id"
            entity="sales_channel"
            required
            show-clearable-button
            @update:value="onStorefrontSelectionChange"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_storefront_domain %}
        <sw-entity-single-select
            v-model:value="productExport.salesChannelDomainId"
            class="sw-sales-channel-detail__product-comparison-domain"
            :label="$tc('sw-sales-channel.detail.productComparison.storefrontDomain')"
            :criteria="storefrontSalesChannelDomainCriteria"
            label-property="url"
            value-property="id"
            entity="sales_channel_domain"
            required
            show-clearable-button
            :disabled="(!productExport.salesChannelDomainId && !productExport.storefrontSalesChannelId) || !acl.can('sales_channel.editor') || undefined"
            :error="productExportSalesChannelDomainIdError"
            @update:value="onStorefrontDomainSelectionChange"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_storefront_domain_currency %}
        <div
            v-if="productExport.salesChannelDomain"
            class="sw-sales-channel-detail-base__product-comparison-container"
        >
            <sw-entity-single-select
                v-model:value="productExport.currencyId"
                :label="$tc('sw-sales-channel.detail.productComparison.storefrontDomainCurrency.label')"
                :criteria="storefrontSalesChannelCurrencyCriteria"
                label-property="name"
                value-property="id"
                required
                entity="currency"
                :disabled="!acl.can('sales_channel.editor') || undefined"
                :error="productExportCurrencyIdError"
                show-clearable-button
            />
        </div>
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_storefront_domain_language %}
        <div
            v-if="productExport.salesChannelDomain"
            class="sw-sales-channel-detail-base__product-comparison-container"
        >
            <sw-entity-single-select
                v-model:value="productExport.salesChannelDomain.languageId"
                :label="$tc('sw-sales-channel.detail.productComparison.storefrontDomainLanguage.label')"
                label-property="name"
                value-property="id"
                entity="language"
                :disabled="true"
                show-clearable-button
            />
            <sw-help-text
                class="sw-sales-channel-detail-base__product-comparison-helptext"
                :text="$tc('sw-sales-channel.detail.productComparison.storefrontDomainLanguage.help')"
                :disabled="!acl.can('sales_channel.editor')"
                tooltip-position="top"
            />
        </div>
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_storefront_sales_channel_customer_group %}
        <div class="sw-sales-channel-detail-base__product-comparison-container">
            <sw-entity-single-select
                v-model:value="salesChannel.customerGroupId"
                :label="$tc('sw-sales-channel.detail.productComparison.storefrontSalesChannelCustomerGroup.label')"
                label-property="name"
                value-property="id"
                entity="customer_group"
                :disabled="true"
                show-clearable-button
            />
            <sw-help-text
                class="sw-sales-channel-detail-base__product-comparison-helptext"
                :text="$tc('sw-sales-channel.detail.productComparison.storefrontSalesChannelCustomerGroup.help')"
                tooltip-position="top"
            />
        </div>
        {% endblock %}
    </mt-card>
    {% endblock %}

    {% block sw_sales_channel_detail_base_general_input_product_comparison_settings %}
    <mt-card
        v-if="salesChannel && isProductComparison"
        position-identifier="sw-sales-channel-detail-base-general-input-product-comparison-settings"
        :is-loading="isLoading"
        :title="$tc('sw-sales-channel.detail.productComparison.settings')"
    >
        {% block sw_sales_channel_detail_base_general_input_product_comparison_filename %}

        <mt-text-field
            v-model="productExport.fileName"
            validation="required"
            required
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :label="$tc('sw-sales-channel.detail.productComparison.fileName')"
            :placeholder="$tc('sw-sales-channel.detail.productComparison.placeholderFileName')"
            :error="productExportFileNameError || invalidFileNameError"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_encoding %}
        <mt-select
            v-model="productExport.encoding"
            :label="$tc('sw-sales-channel.detail.productComparison.encoding')"
            :placeholder="$tc('sw-sales-channel.detail.productComparison.placeholderSelectEncoding')"
            :options="getEncodingOptions"
            label-property="label"
            value-property="id"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            required
            :error="productExportEncodingError"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_file_format %}
        <mt-select
            v-model="productExport.fileFormat"
            :label="$tc('sw-sales-channel.detail.productComparison.fileFormat')"
            :placeholder="$tc('sw-sales-channel.detail.productComparison.placeholderSelectFileFormat')"
            :options="getFileFormatOptions"
            label-property="label"
            value-property="id"
            required
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :error="productExportFileFormatError"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_include_variants %}

        <mt-switch
            v-model="productExport.includeVariants"
            bordered
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :label="$tc('sw-sales-channel.detail.productComparison.includeVariants')"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_interval %}
        <mt-select
            :model-value="productExport.interval"
            :label="$tc('sw-sales-channel.detail.productComparison.interval')"
            :options="getIntervalOptions"
            label-property="label"
            value-property="id"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            @update:model-value="changeInterval"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_generate_by_cronjob %}

        <mt-switch
            v-model="productExport.generateByCronjob"
            bordered
            :label="$tc('sw-sales-channel.detail.productComparison.generateByCronjob')"
            :disabled="disableGenerateByCronjob || !acl.can('sales_channel.editor') || undefined"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_last_generation %}
        <div v-if="productExport.salesChannelDomainId">
            <div
                v-if="productExport.generatedAt"
                class="sw-sales-channel-detail-base_general__last-generation-text"
            >
                {{ $tc('sw-sales-channel.detail.productComparison.lastGenerationLabel') }}<sw-time-ago
                    :date="productExport.generatedAt"
                    :date-time-format="{ month: '2-digit', day: '2-digit' }"
                />
            </div>
            <div
                v-else
                class="sw-sales-channel-detail-base_general__last-generation-text"
            >
                {{ $tc('sw-sales-channel.detail.productComparison.lastGenerationLabel') }}{{ $tc('sw-sales-channel.detail.productComparison.notYetGenerated') }}
            </div>
        </div>
        {% endblock %}

        {% block sw_sales_channel_detail_base_general_input_product_comparison_product_stream %}
        <sw-entity-single-select
            v-model:value="productExport.productStreamId"
            class="sw-sales-channel-detail__product-comparison-product-stream"
            :label="$tc('sw-sales-channel.detail.productComparison.productStream')"
            label-property="name"
            value-property="id"
            required
            show-clearable-button
            :disabled="!acl.can('sales_channel.editor') || undefined"
            entity="product_stream"
            :error="productExportProductStreamIdError"
        />
        {% endblock %}

        <mt-text-field
            v-if="salesChannel.productExports && salesChannel.productExports.length > 0"
            v-model="cliCommand"
            copyable
            :label="$tc('sw-sales-channel.detail.productComparison.cliCommand')"
            readonly
            :disabled="true"
        />
    </mt-card>
    {% endblock %}

    {% block sw_sales_channel_detail_base_options_api %}
    <mt-card
        v-if="salesChannel"
        position-identifier="sw-sales-channel-detail-base-options-api"
        :is-loading="isLoading"
        :title="$tc('sw-sales-channel.detail.titleOptionsApiKey')"
    >
        {% block sw_sales_channel_detail_base_options_api_description %}
        <div
            class="sw-sales-channel-detail-base__description-text"
            v-html="$tc('sw-sales-channel.detail.textApiAccessDescription')"
        ></div>
        {% endblock %}

        {% block sw_sales_channel_detail_base_options_input_access_key %}

        <mt-text-field
            v-if="!isProductComparison"
            v-model="salesChannel.accessKey"
            :label="$tc('sw-sales-channel.detail.labelAccessKeyField')"
            :disabled="true"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_options_input_generate_key %}
        <div
            v-if="!isProductComparison"
            class="sw-sales-channel-detail__action-buttons"
        >
            <mt-button
                size="small"
                :disabled="!acl.can('sales_channel.editor') || undefined"
                class="sw-sales-channel-detail-base__button-generate-keys"
                variant="secondary"
                @click="onGenerateKeys"
            >
                {{ $tc('sw-sales-channel.detail.buttonCreateNewApiKeys') }}
            </mt-button>

            <mt-button
                size="small"
                class="sw-sales-channel-detail-base__button-copy-key"
                variant="secondary"
                @click="copyToClipboard"
            >
                {{ $tc('sw-sales-channel.detail.buttonCopyApiKeyButton') }}
            </mt-button>
        </div>
        {% endblock %}

        {% block sw_sales_channel_detail_base_product_comparison_access_key %}
        {% block sw_sales_channel_detail_base_product_comparison_input_access_key %}

        <mt-text-field
            v-if="isProductComparison"
            v-model="productExport.accessKey"
            :label="$tc('sw-sales-channel.detail.productComparison.accessKey')"
            :disabled="true"
            :copyable="true"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_product_comparison_input_access_url %}

        <mt-text-field
            v-if="isProductComparison && productExport.salesChannelDomainId"
            v-model="productComparisonAccessUrl"
            :label="$tc('sw-sales-channel.detail.productComparison.accessUrl')"
            :disabled="true"
            :copyable="true"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_product_comparison_input_generate_key %}
        <div class="sw-sales-channel-detail__action-button">
            <mt-button
                v-if="isProductComparison"
                ghost
                :disabled="!acl.can('sales_channel.editor')"
                size="small"
                class="sw-sales-channel-detail-base__button-generate-keys"
                variant="secondary"
                @click="onGenerateProductExportKey"
            >
                {{ $tc('sw-sales-channel.detail.productComparison.buttonCreateNewAccessKey') }}
            </mt-button>
        </div>
        {% endblock %}
        {% endblock %}
    </mt-card>
    {% endblock %}

    {% block sw_sales_channel_detail_base_options_status %}
    <mt-card
        v-if="salesChannel"
        position-identifier="sw-sales-channel-detail-base-options-status"
        :title="$tc('sw-sales-channel.detail.titleStatus')"
        :is-loading="isLoading"
    >
        {% block sw_sales_channel_detail_base_options_status_description %}
        <div class="sw-sales-channel-detail-base__description-text">
            {{ $tc('sw-sales-channel.detail.textActiveDescription') }}
        </div>
        {% endblock %}

        {% block sw_sales_channel_detail_base_status_input_active %}

        <mt-switch
            v-model="salesChannel.active"
            :label="$tc('sw-sales-channel.detail.labelInputActive')"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            @update:model-value="onToggleActive"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_options_maintenance_header %}
        <h4 class="sw-sales-channel-detail-base__headline-text">
            {{ $tc('sw-sales-channel.detail.maintenanceModeTitle') }}
        </h4>

        <div class="sw-sales-channel-detail-base__description-text">
            {{ $tc('sw-sales-channel.detail.maintenanceModeDescription') }}
        </div>
        {% endblock %}

        {% block sw_sales_channel_detail_base_maintenance_input_active %}

        <mt-switch
            v-model="salesChannel.maintenance"
            name="sw-field--salesChannel-maintenance"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            :label="$tc('sw-sales-channel.detail.labelMaintenanceActive')"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_maintenance_ipwhitelist %}
        <sw-multi-tag-ip-select
            v-model:value="maintenanceIpAllowlist"
            :is-loading="isLoading"
            :disabled="!acl.can('sales_channel.editor') || undefined"
            class="sw-order-user-card__tag-select"
            :label="$tc('sw-sales-channel.detail.ipAddressAllowlist')"
            :help-text="$tc('sw-sales-channel.detail.ipAddressAllowlistHelpText')"
            :known-ips="knownIps"
            :validate="validateMaintenanceIpCidr"
            error-code="SHOPWARE_INVALID_IP_CIDR"
        />
        {% endblock %}

        {% block sw_sales_channel_detail_base_settings_link %}
        <div class="sw-sales-channel-detail-base__settings-link">
            <router-link
                v-if="acl.can('sales_channel.editor')"
                :to="{ name: 'sw.settings.basic.information.index'}"
                class="sw-card__quick-link"
            >
                {{ $tc('sw-sales-channel.detail.basicinformationLink') }}
                <mt-icon
                    name="regular-long-arrow-right"
                    size="16px"
                />
            </router-link>
        </div>
        {% endblock %}
    </mt-card>
    {% endblock %}

    {% block sw_sales_channel_detail_base_options_delete %}
    <mt-card
        v-if="salesChannel && acl.can('sales_channel.deleter')"
        position-identifier="sw-sales-channel-detail-base-options-delete"
        :title="$tc('sw-sales-channel.detail.deleteModalTitle')"
        :is-loading="isLoading"
    >
        <sw-container
            columns="1fr 175px"
            gap="0px 30px"
            class="sw-sales-channel-detail-base__delete-sales-channel"
        >
            <div class="sw-sales-channel-detail-base__description-text">
                <strong>{{ $tc('global.default.warning') }}</strong>
                {{ $tc('sw-sales-channel.detail.textDeleteSalesChannelWarning') }}
            </div>

            {% block sw_sales_channel_detail_base_options_delete_button %}
            <div class="sw-sales-channel-detail-base__button-delete">
                <mt-button
                    variant="critical"
                    size="small"
                    @click="showDeleteModal = true"
                >
                    {{ $tc('sw-sales-channel.detail.buttonDelete') }}
                </mt-button>
            </div>
            {% endblock %}
        </sw-container>

        {% block sw_sales_channel_detail_base_options_delete_modal %}
        <sw-modal
            v-if="showDeleteModal"
            ref="modal"
            class="sw-sales-channel-detail-base__delete-modal"
            variant="small"
            :title="$tc('sw-sales-channel.detail.deleteModalTitle')"
            @modal-close="onCloseDeleteModal"
        >

            {% block sw_sales_channel_detail_options_delete_modal_confirmtext %}
            <p class="sw-sales-channel-detail-base__delete-modal-confirm-text">
                {{ $tc('sw-sales-channel.detail.textConfirmDelete') }}
            </p>
            <p class="sw-sales-channel-detail-base__delete-modal-name">
                <strong>{{ placeholder(salesChannel, 'name') }}</strong>
            </p>
            <p>{{ $tc('sw-sales-channel.detail.textDeleteInfo') }}</p>
            {% endblock %}

            {% block sw_sales_channel_detail_options_delete_modal_footer %}
            <template #modal-footer>
                {% block sw_sales_channel_detail_options_delete_modal_abort %}
                <mt-button
                    size="small"
                    variant="secondary"
                    @click="onCloseDeleteModal"
                >
                    {{ $tc('global.default.cancel') }}
                </mt-button>
                {% endblock %}

                {% block sw_sales_channel_detail_options_delete_modal_confirm %}
                <mt-button
                    size="small"
                    variant="critical"
                    @click="onConfirmDelete"
                >
                    {{ $tc('sw-sales-channel.detail.buttonConfirmDelete') }}
                </mt-button>
                {% endblock %}
            </template>
            {% endblock %}
        </sw-modal>
        {% endblock %}
    </mt-card>
    {% endblock %}

    {% block sw_sales_channel_detail_custom_field_sets %}
    <mt-card
        v-if="salesChannel && customFieldSets.length > 0"
        position-identifier="sw-sales-channel-detail-base-custom-field-sets"
        :title="$tc('sw-settings-custom-field.general.mainMenuItemGeneral')"
        :is-loading="isLoading"
    >
        <sw-custom-field-set-renderer
            :entity="salesChannel"
            :sets="customFieldSets"
        />
    </mt-card>
    {% endblock %}
</div>
{% endblock %}
